package nn.db.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import nn.db.entity.DtsAdmin;
import nn.db.mapper.AdminMapper;
import nn.db.service.AdminService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 管理员表 服务实现类
 * </p>
 *
 * @author mfx
 * @since 2020-10-27
 */
@Service
public class AdminServiceImpl extends ServiceImpl<AdminMapper, DtsAdmin> implements AdminService {

    @Override
    public List<DtsAdmin> findAdmin(String username) {
        QueryWrapper<DtsAdmin> queryWrapper = new QueryWrapper<DtsAdmin>().eq("username", username);
        List<DtsAdmin> list = list(queryWrapper);

        return list;
    }
}
